package com.jietu.service;

import com.jietu.entity.Car;
import com.jietu.mapper.CarMapper;
import org.apache.ibatis.annotations.Param;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author LQ&LYP lq
 * @ClassName CarServiceImpl
 * @description: TODO
 * @date 2024年12月10日
 * @version: 1.0
 */
@Service
public class CarServiceImpl  implements CarService{
   // 注入mapper   实例化代理类对象
   @Autowired
   private CarMapper carMapper;
    @Override
    public List<Car> searchCar() {
        List<Car> list = carMapper.searchCar();
        return list;
    }

    @Override
    public int addCar(Car car) {
        return carMapper.addCar( car);
    }

    @Override
    public int deleteCar(Integer[] cids) {
        return carMapper.deleteCar( cids);
    }

    @Override
    public int updateCar(Car car) {
        return carMapper.updateCar( car);
    }

}
